<template>
  <div>
    <div class="asidemenu">
      <el-menu
        @select="sel"
        active-text-color="#74BAEB"
        default-active="sum-analysis"
        background-color="#304156"
        text-color="white"
      >
        <el-submenu index="a">
          <template slot="title"> 审核备项目 </template>
          <el-menu-item
            v-for="item in exam_project"
            :index="item.index"
            :key="item.index"
          >
            {{ item.title }}
          </el-menu-item>
        </el-submenu>
        <el-submenu index="b">
          <template slot="title"> 三年滚动计划项目 </template>
          <el-menu-item
            v-for="item in three_project"
            :index="item.index"
            :key="item.index"
          >
            {{ item.title }}
          </el-menu-item>
        </el-submenu>
        <el-submenu index="c">
          <template slot="title"> 亿元五年规划项目 </template>
          <el-menu-item
            v-for="item in five_project"
            :index="item.index"
            :key="item.index"
          >
            {{ item.title }}
          </el-menu-item>
        </el-submenu>
        <el-menu-item index="sum-analysis">
          <span slot="title">综合分析系统</span>
        </el-menu-item>
      </el-menu>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      exam_project: [
        { index: "library-examine", title: "项目库" },
        { index: "report-examine", title: "分析报表" },
      ],
      three_project: [
        { index: "library-three", title: "项目库" },
        { index: "report-three", title: "分析报表" },
      ],
      five_project: [
        { index: "library-five", title: "项目库" },
        { index: "report-five", title: "分析报表" },
      ],
    };
  },
  methods: {
    sel(e) {
      switch (e) {
        case "library-examine":
          this.$router
            .push({
              name: "library-examine",
              params: {
                value: "library-examine",
              },
            })
            .catch((err) => {
              console.log(err);
            });
          break;
        case "report-examine":
          this.$router
            .push({
              name: "report-examine",
              params: {
                value: "report-examine",
              },
            })
            .catch((err) => {
              console.log(err);
            });
          break;
        case "library-three":
          this.$router
            .push({
              name: "library-three",
              params: {
                value: "library-three",
              },
            })
            .catch((err) => {
              console.log(err);
            });
          break;
        case "report-three":
          this.$router
            .push({
              name: "report-three",
              params: {
                value: "report-three",
              },
            })
            .catch((err) => {
              console.log(err);
            });
          break;
        case "library-five":
          this.$router
            .push({
              name: "library-five",
              params: {
                value: "library-five",
              },
            })
            .catch((err) => {
              console.log(err);
            });
          break;
        case "report-five":
          this.$router
            .push({
              name: "report-five",
              params: {
                value: "report-five",
              },
            })
            .catch((err) => {
              console.log(err);
            });
          break;
        case "sum-analysis":
          this.$router
            .push({
              name: "sum-analysis",
              params: {
                value: "sum-analysis",
              },
            })
            .catch((err) => {
              console.log(err);
            });
          break;

        default:
          break;
      }
    },
  },
  created() {
    this.$router
      .push({
        name: "sum-analysis",
        params: {
          value: "sum-analysis",
        },
      })
      .catch((err) => {
        console.log(err);
      });
  },
};
</script>

<style >

</style>